<template>

  <div class="app-container">
    <Uploader url="api/common/file/localUpload" ref='uploader'/>
  </div>
</template>

<script>
import Uploader from "@/components/Uploader";
import { mapGetters } from 'vuex'
import {getToken} from '@/utils/auth'
export default {
  name: 'Dashboard',
  components:{
    Uploader
  },
  data () {
    return {
      url:"http://localhost:8888/api/common/file/upload/",
      fileList: [],
      headers: {
        Authorization:  getToken()
      }
    }
  },

  computed: {
    ...mapGetters([
      'name'
    ])
  },
  methods:{
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePreview(file) {
      console.log(file);
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
/* The container of BaiduMap must be set width & height. */
.map {
  width: 100%;
  height: 1000px;
}
</style>
